package woaini.fenger.core.bot.event.message;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import woaini.fenger.core.bot.enums.PrivateMessageSubType;
import woaini.fenger.core.bot.event.BaseEvent;
import woaini.fenger.core.bot.id.ID;
import woaini.fenger.core.bot.event.Messages;

/**
 * 私聊消息
 *
 * @see PrivateMessageEvent
 * @author yefeng {@code @Date} 2023-05-16 16:50:39
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class PrivateMessageEvent extends BaseEvent {
  /**
   * @see String 消息类型 private 私聊消息
   */
  @JSONField(name = "message_type")
  private String messageType = "private";

  /**
   * @see String 消息类型 子消息类型 friend、group、other friend：好友消息 group：群消息 other：其他消息
   */
  @JSONField(name = "sub_type")
  private PrivateMessageSubType subType;

  /**
   * @see String 消息ID
   */
  @JSONField(name = "message_id")
  private String messageId;

  /**
   * @see String 发送者id
   */
  @JSONField(name = "user_id")
  private ID userId;

  /**
   * @see Messages 消息短
   */
  private Messages message;

  /**
   * @see String 原始消息内容
   */
  @JSONField(name = "raw_message")
  private String rawMessage;
}
